<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
    <link rel="stylesheet" href="./sass/index.css">

</head>

<body>
    <div id="app">
        <!-- header -->

        <header class="bar bar-nav">
            <a class="icon icon-star pull-left"></a>
            <a class="icon icon-edit pull-right"
                @click='addDataFlag = !addDataFlag'
            >
            </a>
            <h1 class="title">备忘录</h1>
        </header>
        <!-- addData -->
        <div class="addData" 
            v-if='addDataFlag'
            @click='addDataFlag = !addDataFlag'
        >
            <div class="addData_shade"></div>
            <div class="addData_cont">
                <div class="input_box">
                    <input type="text" placeholder="请填写待办事宜~"
                        v-model="addData"
                        @click.stop
                    >
                </div>
               <div class="addData_btn">
                    <a href="#" class="button button-fill button-danger"
                        @click = 'addMsg'
                    >确定</a>
                    <a href="#" class="button button-fill"  >
                        取消
                    </a>
               </div>
            </div>
        </div>

        <!-- 删除判断是否已完成 -->
        <div class="addData"
            v-if = 'removeFlag'
            @click = 'removeFlag = !removeFlag'
        >
        <div class="addData_shade"></div>
        <div class="addData_cont">
            <div class="input_box">
               确定删除吗？
            </div>
           <div class="addData_btn">
                <a href="#" class="button button-fill button-danger"
                    @click = 'remove()'
                >确定</a>
                <a href="#" class="button button-fill"  >
                    取消
                </a>
           </div>
        </div>
    </div>
        <!-- content -->
        <div class="content">
            <div class="card" 
                v-for='(item,index) in finishMsg'
                :key='item.id'
            >
                <div class="card-content">
                    <div class="card-content-inner">{{item.cont}}</div>
                    <div class="btn_box">
                        <a href="#" class="button button-success icon icon-check"
                            @click ='item.flag = !item.flag'
                            :class = 'item.flag?"button-fill":""'
                        ></a>
                        <a href="#" class="button button-danger icon icon-remove"
                            @click = 'check(index)'
                        ></a>
                    </div>
                </div>
            </div>
        </div>
            <!-- footer -->
        <div class="footer">
            <a href="#" class="button"
                v-for = 'ify in classify'
                :class = '["button-"+ify.style,ify.text == type?"button-fill":""]'
                :key="ify.id"
                @click = 'type = ify.text'
            >{{ify.text}}</a> 
        </div>
    </div>



</body>
<script src="js/vue.js"></script>
<script src="js/index.js"></script>

</html>